<include file="public/layout" />
<style>
    td{height:40px;line-height:40px; padding-left:20px;}
    .span_1{
        float:left;
        margin-left:0px;
        height:130px;
        line-height:130px;
    }
    .span_1 ul{list-style:none;padding:0px;}
    .span_1 ul li{
        border:1px solid #CCC;
        height:40px;
        padding:0px 10px;
        margin-left:-1px;
        margin-top:-1px;
        line-height:40px;
    }
</style>
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
            <div class="subject">
                <h3>城市合伙人 - 城市合伙人信息</h3>
                <h5>网站系统城市合伙人会员信息</h5>
            </div>
        </div>
    </div>
    <form class="form-horizontal" id="user_form" method="post">
        <div class="ncap-form-default">

            <dl class="row">
                <dt class="tit">
                </dt>
                <dd class="opt">
                    <div style="height:160px;">
                        <span class="span_1">
                            <ul>
                                <li>用户余额</li>
                                <li>合伙人数量</li>
                                <li>下级门诊数</li>
                                <li>二级门诊数</li>
                            </ul>
                        </span>
                        <span class="span_1">
                            <ul>
                                <li><strong class="red">{$user.user_money}</strong>&nbsp;元 </li>

                                <li>
                                   {$user.friend_num}
                                </li>
                                <li>
                                   {$user.next_mznum}
                                </li>
                                <li>
                                   {$user.second_mznum}
                                </li>
                            </ul>
                        </span>
                        <span class="span_1">
                            <ul>
                                <li>用户总金额</li>
                                <li>合伙人分红</li>
                                <li>下级门诊分红</li>
                                <li>二级门诊数分红</li>
                            </ul>
                        </span>
                        <span class="span_1">
                            <ul>
                                <li><strong class="red">{$user.total_amount}</strong>&nbsp;元 </li>
                                <li>
                                    {$user.friend_money}
                                </li>
                                <li>
                                    {$user.next_mzmoney}
                                </li>
                                <li>
                                    {$user.second_mzmoney}
                                </li>
                            </ul>
                        </span>
                        <span class="span_1">
                            <ul>
                                <li></li>
                                <li></li>
                                <li>下级门诊订单分红</li>
                                <li>二级门诊订单分红</li>
                            </ul>
                        </span>
                        <span class="span_1">
                            <ul>
                                <li></li>
                                <li>

                                </li>
                                <li>
                                    {$user.next_ordermoney}
                                </li>
                                <li>
                                    {$user.second_ordermoney}
                                </li>
                            </ul>
                        </span>
                        <div style="clear:both;"></div>
                    </div>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>会员昵称</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt valid" name="nickname" value="{$user.nickname}"  type="text" readonly>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>会员资产</label>
                </dt>
                <dd class="opt">
                    <strong class="red">{$user.user_money}</strong>&nbsp;余额 &nbsp;&nbsp;
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>提现金额</label>
                </dt>
                <dd class="opt">
                    <input type="number" class="input-txt valid" name="money"type="text" >
                </dd>
            </dl>

            <if condition = "session('user_id') eq 0 ">
                <div class="bot"><a href="JavaScript:void(0);" onclick="checkUserUpdate();" class="ncap-btn-big ncap-btn-green">确认提交</a></div>
                <elseif condition="$user.user_id eq session('user_id')"/>
                <div class="bot"><a href="JavaScript:void(0);" onclick="checkUserUpdate();" class="ncap-btn-big ncap-btn-green">确认提交</a></div>
            </if>
        </div>
    </form>
</div>
<script type="text/javascript">
    function checkUserUpdate(){
        // var email = $('input[name="email"]').val();
        var money = $('input[name="money"]').val();

        var error ='';
        if(money > {$user['user_money']}){
            error += "金额超过可提现金额\n";
        }
        if(error){
            layer.alert(error, {icon: 2});  //alert(error);
            return false;
        }
        $('#user_form').submit();
    }
</script>
</body>
</html>